import request from '@/utils/request'

// 查询项目盈利预测版本列表
export function listDealIndicatorPredictVersion(query) {
  return request({
    url: '/version/dealIndicatorPredictVersion/list',
    method: 'get',
    params: query
  })
}

// 查询项目盈利预测版本详细
export function getDealIndicatorPredictVersion(id) {
  return request({
    url: '/version/dealIndicatorPredictVersion/' + id,
    method: 'get'
  })
}

// 保存项目盈利预测版本
export function saveDealIndicatorPredictVersion(data) {
  return request({
    url: '/version/dealIndicatorPredictVersion/save',
    method: 'post',
    data: data
  })
}

// 删除项目盈利预测版本
export function delDealIndicatorPredictVersion(id) {
  return request({
    url: '/version/dealIndicatorPredictVersion/' + id,
    method: 'delete'
  })
}

// 导出项目盈利预测版本
export function exportDealIndicatorPredictVersion(query) {
  return request({
    url: '/version/dealIndicatorPredictVersion/export',
    method: 'get',
    params: query
  })
}

// 获取项目ID上次最新盈利预测表
export function getIndicatorByDealId(dealId) {
  return request({
    url: '/version/dealIndicatorPredictVersion/getIndicatorByDealId/' + dealId,
    method: 'get'
  })
}

// 导出指标
export function exportIndicator(versionId) {
  return request({
    url: '/version/dealIndicatorPredictVersion/exportIndicator/' + versionId,
    method: 'get'
  })
}

// 报表
export function reportForm(dealId) {
  return request({
    url: '/version/dealIndicatorPredictVersion/reportForm/' + dealId,
    method: 'get'
  })
}
